package com.xucy.springboot.designmodel.behavioral.chain;

/**
 * @Author xucy
 * @Date 2019-10-23 18:00
 * @Description
 **/

public class TwoFilter extends BaseFilter{
    public TwoFilter(boolean flag){
        this.flag=flag;
    }

    @Override
    public void doSomeThing() {
        if(flag){
            System.out.println(this.toString()+"处理了");
        }

        if(this.nextFilter!=null){
            this.nextFilter.doSomeThing();
        }
    }
}
